package com.mt.vsphere.core.bean;

import com.fasterxml.jackson.annotation.JsonFormat;

@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum Meta {
    SUCCESS(200, "操作成功"),
    TokenExpire(401, "请登录后重试"),
    PwdErr(500, "账号或密码错误"),
    ArticleNOTExist(500, "文章不存在"),
    VerifyCodeError(500, "验证码错误！"),
    PhoneAndPwdError(500, "用户名或密码错误！"),
    UserExistError(500, "用户已存在！"),
    UserNotExistError(500, "用户不存在,请注册！"),
    ServerError(500, "服务器错误!");

    private int code;
    private String message;

    Meta(int code, String message){
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }


    @Override
    public String toString() {
        return "code="+code+" message="+message;
    }
}
